/*++****************************************************************************
*
*	Name: vexMotor.h
*   
*	Description:	This module provides defines and structures for the 
*					vex motor output interface. 
*
*	Revision History:
*	Date	Who	Comments	
*	------	---	---------------------------------------------------------------
*	100927	RLP	Created
****************************************************************************--*/

#ifndef VEXMOTOR_H
#define VEXMOTOR_H


/******************************************************************************
								CONSTANTS AND MACROS
******************************************************************************/

// MACROS

/******************************************************************************
								TYPEDEFS
******************************************************************************/


/******************************************************************************
								FUNCTION PROTOTYPES
******************************************************************************/

// Open motor device
extern INT16 VexMotorOpen(	int		ocChan,		// Output Compare Channel #
							int		timerNum );	// timer number (2 or 3)

extern INT16 VexMotorWrite(INT16 handle, INT16 speed);

extern INT16 VexServerMotorWrite(INT16 handle, INT16 posn);

extern INT16 VexMotorClose( INT16 handle );

/******************************************************************************
								ERROR CODES
******************************************************************************/

#define PWM_SUCCESS						0			// success
#define PWM_BAD_HANDLE					1			// invalid handle

#endif
